package com.learn.io.nio;

import lombok.extern.slf4j.Slf4j;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

/**
 * @classname:
 * @Description:
 * @author: yfpu
 * @Date: 2018-12-13 15:37
 */
public class NioClient {

    public static void main(String[] args) throws IOException {
        Socket socket = new Socket("127.0.0.1", 8888);
        OutputStream outputStream = socket.getOutputStream();
        String s = "hello world";
        outputStream.write(s.getBytes());
        outputStream.close();

    }
}
